﻿//======================================================
//==     (c)2008 aspxcms inc by NeTCMS v1.0              ==
//==          Forum:bbs.aspxcms.com                   ==
//==         Website:www.aspxcms.com                  ==
//======================================================
using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using NetCMS.DALFactory;
using NetCMS.Model;

namespace NetCMS.Content
{
    public class Ghistory
    {
        private IGhistory dal;
        public Ghistory()
        {
            dal = NetCMS.DALFactory.DataAccess.CreateGhistory();
        }

        #region ChangePassword.aspx
        public int sel_sysUserInfo(string UserNum, string UserPassword)
        {
            return dal.sel_sysUserInfo(UserNum, UserPassword);
        }
        #endregion

        #region collection.aspx
        public bool addTo(string NewsID,int ChID)
        {
            return dal.addTo(NewsID, ChID);
        }
        #endregion

        #region Exchange.aspx
        public DataTable sel_sysUser(string UserNum,int flag)
        {
            return dal.sel_sysUser(UserNum,flag);
        }
        public int update_userInfo(int ipoint2, int gpoint2, string UserNum)
        {
            return dal.update_userInfo(ipoint2, gpoint2, UserNum);
        }
        public int Add(GhistoryInfo Gh, int ghtype, string UserNum, string content)
        {
            return dal.Add(Gh, ghtype, UserNum, content);
        }
        #endregion

        #region getPoint.aspx
        public int sel_userCardInfo(string cnm)
        {
            return dal.sel_userCardInfo(cnm);
        }
        public int sel_sysPramUser()
        {
            return dal.sel_sysPramUser();
        }
        public int add_userGhistory(string GhID, string UserNum, int Gpoint, int Money, DateTime CreatTime, string content)
        {
            return dal.add_userGhistory(GhID, UserNum, Gpoint, Money, CreatTime, content);
        }
        public int update_userInfos(string UserNum, string cnm,int flag)
        {
            return dal.update_userInfos(UserNum, cnm,flag);
        }
        public int update_sysUser(int Money1, string UserNum,int flag)
        {
            return dal.update_sysUser(Money1, UserNum,flag);
        }
        #endregion

        #region history.aspx
        public int del_userInfo(string ID,int flag)
        {
            return dal.del_userInfo(ID,flag);
        }
        #endregion

        #region mycom.aspx
        public DataTable GetPage(string title, string Um, string dtm1, string dtm2, string isCheck, string islock, string SiteID, string UserNum, int DelOTitle, int EditOtitle, int PageIndex, int PageSize, out int RecordCount, out int PageCount, params SQLConditionInfo[] SqlCondition)
        {
            return dal.GetPage(title, Um, dtm1, dtm2, isCheck, islock, SiteID, UserNum, DelOTitle, EditOtitle, PageIndex, PageSize, out RecordCount, out PageCount, SqlCondition);
        }
        #endregion

        #region mycom_up.aspx
        public int update_apiCommentary(string Title, string Contents, DateTime CreatTime, string Commid, int islocks)
        {
            return dal.update_apiCommentary(Title, Contents, CreatTime, Commid, islocks);
        }
        #endregion

        public DataTable GetPagepoi(string typep, string UM, string sle_NUM,string SiteID,string UserNum, int PageIndex, int PageSize, out int RecordCount, out int PageCount, params SQLConditionInfo[] SqlCondition)
        {
            return dal.GetPagepoi(typep, UM, sle_NUM,SiteID,UserNum, PageIndex, PageSize, out RecordCount, out PageCount, SqlCondition);
        }

        #region 友情连接
        public DataTable sel_friendInfo(int flag)
        {
            return dal.sel_friendInfo(flag);
        }
        public int ISExitNamee(string Str_Name)
        {
            return dal.ISExitNamee(Str_Name);
        }
        public int SaveLink(string Str_Class, string Str_Name, string Str_Type, string Str_Url, string Str_Content, string Str_PicUrl, string Str_Author, string Str_Mail, string Str_ContentFor)
        {
            return dal.SaveLink(Str_Class,Str_Name, Str_Type, Str_Url, Str_Content,Str_PicUrl,Str_Author,Str_Mail, Str_ContentFor);
        }

        public void del_friendLink(string id)
        {
            dal.del_friendLink(id);
        }

        public DataTable sel_friendLink(int num, string uid)
        {
            return dal.sel_friendLink(num, uid);
        }

        #endregion
    }
}
